/*
 * Copyright (c) 2011 Jean-Marc Perronne
 * Ensisa, 12 rue des Freres Lumieres, F-68093 Mulhouse cedex
 * All rights reserved.
 *
 * The copyright of this software is owned by Werner Randelshofer. 
 * You may not use, copy or modify this software, except in  
 * accordance with the license agreement you entered into with  
 * Jean-Marc Perronne. For details see accompanying license terms. 
 */

package fr.uha.ensisa.jmp.drone.recorder.configuration;

import java.io.IOException;

import fr.uha.ensisa.jmp.drone.configuration.Configurations;
import fr.uha.ensisa.jmp.drone.recorder.Writer;


public class DroneConfigWriter implements Writer<String[]>
{
	private Configurations configuration;
	
	public void open(Configurations configuration) throws IOException
	{
		this.configuration = configuration;
	}
	
	@Override
	public void open() throws IOException
	{
	}

	@Override
	public void close() throws IOException
	{		
	}

	@Override
	public void write(String[] record) throws IOException
	{
		this.configuration.put(record[0], record[1]);
		System.out.println(record[0] + "=" + record[1]);

	}

}
